import { defineStore } from "pinia";

export const useStore = defineStore('user', {
    state() {
        return {
            name: '',
            phone: '',
            token: '',
            counter: 0
        }
    },

    getters: {
        getToken(state) {
            return state.token
        }
    },

    actions: {
        setUser(data: Object) {
            this.$patch(data)
        }
    },

    persist: true
})